#include <iostream>
#include <algorithm>
#include <queue>
using namespace std;
constexpr int MAXV = 100;
int N, M, R, V, E; // 女兵编号0 - N - 1, 男兵编号N - M + N - 1
struct edge{int from, to, cost;};
int x[MAXV], y[MAXV], d[MAXV];

edge es[MAXV];
void solve() {
    V = N + M;
    E = R;
    for (int i = 0; i < R; i++) {
        es[i] = (edge) {x[i], N + y[i], -d[i]};
    }
}